from django.shortcuts import render
from rest_framework.response import Response
from rest_framework.views import APIView
# 导入七牛模块
from qiniu.auth import Auth
# 导入类方法装饰器
from django.utils.decorators import method_decorator

from pymongo import MongoClient
from bson import json_util as jsonb
#导入原生sql模块
from django.db import connection

#导入redis数据库
import redis

#导包
from django.http import HttpResponse,HttpResponseRedirect,JsonResponse

#定义地址和端口
host = '127.0.0.1'
port = 6379

#建立redis连接
r = redis.Redis(host=host,port=port)

